package com.opp.demo07;

public class Student extends  Person{
    public void go(){
        System.out.println("go");
    }
}


/*
package com.opp;

import com.opp.demo07.Person;
import com.opp.demo07.Student;
import com.opp.demo07.Teacher;

public class Main {
    public static void main(String[] args) {
        //Object > string
        //Object > Person > Teacher
        //Object > Person > Student
        Object object = new Student();

        //System.out.println(x instanceof y); 编译能不能通过 接口

        System.out.println(object instanceof Student);//true
        System.out.println(object instanceof Person);//true
        System.out.println(object instanceof Object);//true
        System.out.println(object instanceof Teacher);//False
        System.out.println(object instanceof String);//False

        Person person = new Student();
        System.out.println("=========");
        System.out.println(person instanceof Student);//true
        System.out.println(person instanceof Person);//true
        System.out.println(person instanceof Object);//true
        System.out.println(person instanceof Teacher);//False
//        System.out.println(person instanceof String);//编译错误

        Student student = new Student();
        System.out.println("=========");
        System.out.println(student instanceof Student);//true
        System.out.println(student instanceof Person);//true
        System.out.println(student instanceof Object);//true
//        System.out.println(student instanceof Teacher);//编译错误
//        System.out.println(person instanceof Teacher);//编译错误


    }

}

 */